package org.clockworkmages.games.anno1186.generator;

import java.util.List;

import org.clockworkmages.games.anno1186.dao.GameObjectsList;
import org.clockworkmages.games.anno1186.model.character.NonPlayerCharacter;
import org.clockworkmages.games.anno1186.model.option.GenericOption;
import org.clockworkmages.games.anno1186.scripting.tools.EffectBuilder;

public abstract class GameObjectGenerator {

	public abstract GameObjectsList generate();

	protected void addDefaultEffectsToCombatOptions(GameObjectsList gameObjects) {
		for (NonPlayerCharacter enemy : gameObjects.getNpcs()) {
			for (List<GenericOption> options : new List[] {
					enemy.getVictoriousOptions(), enemy.getSubduingOptions(),
					enemy.getDefeatedOptions(), enemy.getSubduedOptions() }) {
				for (GenericOption option0 : options) {
					option0.getEffects().add(
							EffectBuilder.NEW().me().healthAtLeast1()
									.compileEffect());
				}
			}
		}
	}

	public abstract String getFileName();

}
